import request from '@/utils/request'
// 获取面经列表
export const getArticleList = (params) => {
  return request.get('/admin/interview/query', {
    params
  })
}
// 添加面经
export const AddArticle = (obj) => {
  return request({
    url: '/admin/interview/create',
    method: 'POST',
    data: {
      stem: obj.stem,
      content: obj.content
    }
  })
}
// 编辑面经
export const editArticle = (id) => {
  return request({
    method: 'get',
    url: `/admin/interview/show?id=${id}`
  })
}
export const updateArticle = (data) => {
  return request({
    method: 'put',
    url: '/admin/interview/update',
    data
  })
}
// 删除面经
export const delArticle = (id) => {
  return request({
    method: 'delete',
    url: '/admin/interview/remove',
    data: { id }
  })
}
// 获取单个面经详情
export const getArticleDetail = (id) => {
  return request.get('/admin/interview/show', {
    params: {
      id
    }
  })
}
